package vip.xiaonuo.invoice.core.exception;


import lombok.Data;

@Data
public class InvoiceException extends RuntimeException{
    /**
     * 错误码
     */
    protected Integer errorCode;

    /**
     * 错误信息
     */
    protected String errorMsg;

    public InvoiceException() {
        super("发票异常");
        this.errorCode = 500;
        this.errorMsg = "发票异常";
    }

    public InvoiceException(String message) {
        super(message);
        this.errorCode = 500;
        this.errorMsg = message;
    }

    public InvoiceException(Integer code, String message) {
        super(message);
        this.errorCode = code;
        this.errorMsg = message;
    }
}
